<template>
  <div class="g-wrap">
  <!-- 头部 Start -->
	<div class="g-header">
		<div class="m-mainct-box clearfix">
			<div class="m-header-left">
						<span class="u-header-item">
							<i class="icon iconfont icon-kefu"></i>
						</span>
				<a class="u-header-item" href="javascript:;">联系客服</a>
				<em class="u-header-item">|</em>
				<a class="u-header-item" href="javascript:;">家族登录</a>
			</div>
			<div class="m-header-right">
				<a class="u-header-item" href="javascript:;">分享赚钱</a>
				<em class="u-header-item">|</em>
				<a class="u-header-item" href="javascript:;">申请加入家族</a>
				<em class="u-header-item">|</em>
				<a class="u-header-item" href="javascript:;">我要充值</a>
				<em class="u-header-item">|</em>

				<div class="m-header-user" id="user_info_div">
						<a class="m-huser-head" href="javascript:;">
								<span class="u-huser-head">
									<img v-bind:src="avatar" alt="">

									<em v-if="1==1" class="level" id="biaozhiu">v</em>

								</span>
							<em class="u-header-item u-huser-name">{{nickname}}</em>
						</a>

						<span class="u-header-arricon">
								<i class="icon iconfont icon-arrLeft-fill"></i>
							</span>
						<div class="m-user-selbox">
							<a class="u-user-selitem" href="javascript:;" onclick="location.href='personal-topup.html'">
								<i class="icon iconfont icon-zhuye"></i>
								<em>我的主页</em>
							</a>
							<a class="u-user-selitem" href="javascript:;">
								<i class="icon iconfont icon-tuichu"></i>
								<em>退出登录</em>
							</a>
						</div>
				</div>
			</div>
		</div>
	</div>
    <router-view></router-view>
    <Footer></Footer>
    <Suspend></Suspend>
    <SuspendTalk v-on:talkWinIsshow="talk" :pro="pro" :nowTalkid="nowMemberid" :avatar="avatar" :nickname="nickname":isshow="isshow"></SuspendTalk>
  </div>
</template>

<script>
  import Footer from './Footer'
  import Suspend from './Suspend'
  import SuspendTalk from './SuspendTalk'

export default {
  name: 'Index',
  components:{
    Footer,
    Suspend,
    SuspendTalk
  },
  data () {
    var user;
    $.ajax({
      url:this.GLOBAL.base_url+'/yiAppWeb/memberinfo',
      async:false,
      data:{
        id:this.GLOBAL.uid,
        token:this.GLOBAL.token
      },
      dataType:'json',
      success:function (res) {
        if(res.status==200){

          user = res.content;
        }else{
          user = {};
        }
      }
    })
    user['pro'] = 0;
    user['nowMemberid'] = 0;
    user['isshow'] =false;
    return user;
  },
  created:function () {//实例化后需要执行的方法

  },
  methods:{
    talk(isshow){
      this.isshow = isshow;
    }
  }

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
